from v2.Pipeline import Pipeline
from v2.MySqlConnector import MySqlHelper


class MySqlPipeline(Pipeline):
    def __init__(self):
        self.helper = MySqlHelper()

    def process(self, result_item):
        print(result_item)
        self.helper.insert_many('insert into test.users(username, password) values(%s, %s);',
                                param_list=[('123', '456'), ('567', '789')])